#include "service_url.h"
#include "service_url_parser.h"
#include <iostream>

namespace vpm
{
	namespace mina
	{

		ServiceUrl::ServiceUrl(const std::string & url):m_url(url)
		{
			schemeType = NONE;
			port = 0; 
			if (!url.empty())
			{		
				ServiceUrlParser parser(*this);
				parse_info<> info = parse(url.c_str(),parser,space_p);
			}
		}    

		void ServiceUrl::to_string()
		{
			std::cout <<  scheme << " "<<schemeType << " "  << host << " " << port << " \n"; 
		}

	}
}


